//	Opmesboxp
sdim s,60000
//	㕶pmesboxp
sdim t,60000
//	m[gpbhp
sdim u,60000

title "add LR"
//	ʏ
	f_skip_label=0
	screen 0,480,600
	mes "  ǉ̑O"
//	sg̑Opmesbox
	mesbox s,480,200,5
//	button[l][r]sɒǉ
	objsize 100,24
	pos 0,230
	button "[BR]ǉ s",*do_add_br
	pos 100,230
	button "[l][r]ǉ s",*do_add_lr
	pos 200,230
	objsize 150,24
	button "w蕶 ǉ s",*do_add_hoge
	v4input=""
	input v4input,200,30
	ID4input=stat
	objsize 100,24
//	̃`FbNBOX`FbN*Ŏn܂sɂ[l][r]sɒǉȂ
	pos 0,260
	chkbox "x",f_skip_label
	mes "  ǉ̌"
//	tg̑㕶pmesbox
	mesbox t,480,320,5
	stop
//	w蕶sɒǉTu[`
*do_add_hoge
	sdim tmp,2000
//	Omesbox̒g̓suɃRs[
		u=s
//	um[gpbh߂̑Ώۂɂ
	notesel u
//	̍sJԂ̂notemaxJԂ
	repeat notemax
//	`FbNBOX`FbNĂ
		if f_skip_label==1{
			noteget tmp,cnt
//	m[gpbhꕶo
			tmp_2=strmid(tmp,0,1)
//	̕*łȂ[BR]sɒǉ
			if tmp_2!="*"{
				tmp+=v4input
				noteadd tmp,cnt,1
			}
		}else{
//	m[gpbhcntԖڂ̍s̕o
			noteget tmp,cnt
//	̌ɂ
			tmp+=v4input
//	m[gpbh̎osɏ㏑ii[j
			noteadd tmp,cnt,1
		}
		loop
//	oオ𑀍Omeboxɔf
	objprm 6,u
	stop
	stop
//	sɒǉTu[`
*do_add_br
	sdim tmp,2000
//	Omesbox̒g̓suɃRs[
		u=s
//	um[gpbh߂̑Ώۂɂ
	notesel u
//	̍sJԂ̂notemaxJԂ
	repeat notemax
//	`FbNBOX`FbNĂ
		if f_skip_label==1{
			noteget tmp,cnt
//	m[gpbhꕶo
			tmp_2=strmid(tmp,0,1)
//	̕*łȂ[BR]sɒǉ
			if tmp_2!="*"{
				tmp+="[BR]"
				noteadd tmp,cnt,1
			}
		}else{
//	m[gpbhcntԖڂ̍s̕o
			noteget tmp,cnt
//	̌ɂ
			tmp+="[BR]"
//	m[gpbh̎osɏ㏑ii[j
			noteadd tmp,cnt,1
		}
		loop
//	oオ𑀍Omeboxɔf
	objprm 6,u
	stop
	
//	[l][r]sɒǉTu[`
*do_add_lr
	sdim tmp,2000
//	Omesbox̒g̓suɃRs[
		u=s
//	um[gpbh߂̑Ώۂɂ
	notesel u
//	̍sJԂ̂notemaxJԂ
	repeat notemax
//	`FbNBOX`FbNĂ
		if f_skip_label==1{
			noteget tmp,cnt
//	m[gpbhꕶo
			tmp_2=strmid(tmp,0,1)
//	̕*łȂ[l][r]sɒǉ
			if tmp_2!="*"{
				tmp+="[l][r]"
				noteadd tmp,cnt,1
			}
		}else{
//	m[gpbhcntԖڂ̍s̕o
			noteget tmp,cnt
//	̌ɂ
			tmp+="[l][r]"
//	m[gpbh̎osɏ㏑ii[j
			noteadd tmp,cnt,1
		}
		loop
//	oオ𑀍Omeboxɔf
	objprm 6,u
	stop